1. Field of the Invention
The present invention relates to an image processing method. More particularly, the present invention relates to an image processing method for solving pixel interference of an image.
2. Description of Related Art
FIG. 1 is a block diagram of the circuit of a conventional image capturing device. Referring to FIG. 1, an image sensing module includes an image sensing device 10, an analog control circuit 11, and an analog-to-digital signal converter 12. An image signal processor includes an image sensing device compensator 13, a color interpolation device 14, and an image quality enhancing device 15. The image sensing device 10 includes a condensing lens 16, a color filter array 17, and a photo-diode 18. As each pixel corresponds to a color in the color filter array 17, the image sensing module will output Bayer array data 19.
Normally, image data can be the Bayer array data shown in FIG. 2. FIG. 2 is a 5×5 Bayer array data. Referring to FIG. 2, a red pixel R or a blue pixel B can be in a horizontal direction of a green pixel. If the red pixel R is in the horizontal direction of the green pixel, the green pixel is referred to as a Gr pixel. If the blue pixel B is in the horizontal direction of the green pixel, the green pixel is referred to as a Gb pixel. The pixel interference, such as optical coupling and electrical leakage of elements, will cause the difference of converted electrical signals when the same light is absorbed by the Gr or Gb pixels. Therefore, after the electrical signals pass through the color interpolation device 14, false color occurs.
In the conventional art, such as the interpolation method disclosed by W. Li et al. (W. Li, P. Ogunbona, Y. Shi, and I. Kharitonenko, “CMOS Sensor Cross-Talk Compensation for Digital Cameras”, IEEE Trans. on Consumer Electronics, Vol. 48, No. 2, pp. 292-297, May 2002), G7 pixel in the Bayer array data shown in FIG. 3 is regarded as a Gr pixel to be compensated, and the compensated G7new is calculated according to the formulae below.Gnew7=G7+ΔG whereΔG7=(ΔG4+ΔG5+ΔG9+ΔGa)/4ΔG4=G4−(G1+G2+G6+G7)/4ΔG5=G5−(G2+G3+G7+G8)/4ΔG9=G9−(G6+G7+Gb+Gc)/4ΔGa=Ga−(G7+G8+Gc+Gd)/4
According to the above formulae, it is known that the compensation value is an average value of four surrounding Gb differential values, where each Gb differential value is obtained by subtracting the average value of four surrounding Gr values. As this method captures a great quantity of surrounding pixels to calculate the average values, when tiny line structures fall in the region, false color occurs around the lines and on the lines. Meanwhile, this method compensates one of the Gr or Gb pixels only, which makes the entire compensated image tend to be bluish or reddish. Moreover, W. Li et al. disclosed a second average value method in the same paper. Though the Gb and Gr pixels are compensated at the same time, this average value method still captures a great quantity of surrounding pixels to calculate the average values, and causes false color in tiny structures as well.
In addition, the interpolation method disclosed by C. Weerasinghe et al. (C. Weerasinghe, I. Kharitonenko, and P. Ogunbona, “Method of Color Interpolation in a Single Sensor Color Camera Using Green Channel Separation”, IEEE Proceeding 2002, pp. 3233-3236, 2002) regards a G7 pixel 30 in Bayer array data shown in FIG. 3 as a Gr pixel to be compensated, and the compensated G7new is calculated according to the formula below.
      G    7    new    =                    G        7            +              SMF        ⁡                  (                                    G              4                        ,                          G              5                        ,                          G              9                        ,                          G              a                        ,                          G              7                                )                      2  where, SMF (standard median filter) stands for a median value extraction filter. Therefore, a compensation value is obtained by extracting the median value of the G7 and the four surrounding Gb, and then the G7new is an average value of the median value and the G7. This method often extracts wrong median for tiny line structures, thus causing false color in the tiny line structures as well.